how to take array input in java using scanner